﻿#ifndef SSONGLIST_H_
#define SSONGLIST_H_

#include <QObject>
#include <Qlist>
#include <QUrl>




class SsongList : public QObject
{
	Q_OBJECT
public:
	explicit SsongList(QObject* parent = nullptr);

	void addUrl(const QUrl& url);
	void addUrl(const QStringList& urls);
	QUrl getUrl(qint32 index) const;
	QUrl currentUrl() const;

	qint32 currentIndex() const;
	void setCurrentIndex(qint32 index);

	void prevSong();
	void nextSong();
	void firstSong();
	void lastSong();


private:
	QList<QUrl> m_urlList;				//播放列表
	qint32		m_currentIndex = 0;		//播放列表的初始默认0项；

};

#endif // !SSONGLIST_H_
